package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 角色表 实体类
 * 表名：sys_role
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "sys_role")
public class SysRole implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键id
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false, length = 32)
    private String id;
    
    /**
     * 角色名称
     */
    @Column(name = "role_name", length = 200)
    private String roleName;
    
    /**
     * 角色编码
     */
    @Column(name = "role_code", nullable = false, length = 100)
    private String roleCode;
    
    /**
     * 描述
     */
    @Column(name = "description", length = 255)
    private String description;
    
    /**
     * 租户主键ID
     * 默认值: 1
     */
    @Column(name = "tenant_id")
    private Integer tenantId;
    
    /**
     * 创建人
     */
    @Column(name = "create_by", length = 32)
    private String createBy;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private java.time.LocalDateTime createTime;
    
    /**
     * 更新人
     */
    @Column(name = "update_by", length = 32)
    private String updateBy;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private java.time.LocalDateTime updateTime;
    
    @Override
    public String toString() {
        return "SysRole{" +
            "id=" + id +
            ", roleName=" + roleName +
            ", roleCode=" + roleCode +
            ", description=" + description +
            ", tenantId=" + tenantId +
            ", createBy=" + createBy +
            ", createTime=" + createTime +
            ", updateBy=" + updateBy +
            ", updateTime=" + updateTime +
        '}';
    }
} 